home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / OEMNADD3.IN_ / oemnadd3.inf
INI File  |  1996-07-12  |  28KB  |  830 lines

  1. [Identification]
  2.     OptionType = NetAdapter
  3. [PlatformsSupported]
  4.     EISA
  5.     PCI
  6.     "Jazz-Internal Bus"
  7. [Options]
  8.     DEC300
  9. [FileConstants]
  10. UtilityInf      = "UTILITY.INF"
  11. subroutineinf   = "SUBROUTN.INF"
  12. SoftwareType    = "driver"
  13. Exit_Code       = 0
  14. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  15. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  16. DEC300_1BYTE    = 3187472
  17. Manufacturer    = "DigitalEquipment"
  18. ProductMajorVersion     = "4"
  19. ProductMinorVersion     = "0"
  20. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  21. ProductSoftwareName     = "Defea"
  22. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\defea.sys"
  23. NetRuleSoftwareType     = "defeaSys ndisDriver defeaDriver"
  24. NetRuleSoftwareUse      = $(SoftwareType)
  25. NetRuleSoftwareBindForm = """DefeaSys"" yes no container"
  26. NetRuleSoftwareClass    = {"defeaDriver basic"}
  27. ProductHardwareName     = "Defea"
  28. NetRuleHardwareType     = "dec300 dec300Adapter"
  29. NetRuleHardwareBindForm = " yes yes container"
  30. NetRuleHardwareClass    = {"dec300Adapter basic"}
  31. ProductOpSupport     = 134 
  32. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  33. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  34. [GeneralConstants]
  35. from      = ""
  36. to        = ""
  37. ExitCodeOk     = 0
  38. ExitCodeCancel = 1
  39. ExitCodeFatal  = 2
  40. KeyNull         = ""
  41. MAXIMUM_ALLOWED   = 33554432
  42. RegistryErrorIndex = NO_ERROR
  43. KeyProduct      = ""
  44. KeyParameters   = ""
  45. TRUE            = 1
  46. FALSE           = 0
  47. NoTitle            = 0
  48. ExitState   = "Active"
  49. OldVersionExisted = $(FALSE)
  50. DriverPath      = $(!STF_NTPATH)\drivers
  51. Successful_Install = 0
  52. [date]
  53.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  54. [processor]
  55.     PROC_TYPE = "" ? $(LIBHANDLE) GetProcessor
  56. [Identify]
  57.     read-syms Identification
  58.     set Status     = STATUS_SUCCESSFUL
  59.     set Identifier = $(OptionType)
  60.     set Media      = #("Source Media Descriptions", 1, 1)
  61.     Return $(Status) $(Identifier) $(Media)
  62. [ReturnOptions]
  63.     set Status        = STATUS_FAILED
  64.     set OptionList     = {}
  65.     set OptionTextList = {}
  66.     set LanguageList = ^(LanguagesSupported, 1)
  67.     Ifcontains(i) $($0) in $(LanguageList)
  68.         ifstr(i) $($1) == ""
  69.            goto returnoptions
  70.         endif
  71.         set PlatformList = ^(PlatformsSupported, 1)
  72.         Ifcontains(i) $($1) in $(PlatformList)
  73.            goto returnoptions
  74.         else
  75.            set Status = STATUS_NOTSUPPORTED
  76.            goto finish_ReturnOptions
  77.         endif
  78.     else
  79.         set Status = STATUS_NOLANGUAGE
  80.         goto finish_ReturnOptions
  81.     endif
  82. returnoptions = +
  83.     set OptionList     = ^(Options, 1)
  84.     set OptionTextList = ^(OptionsText$($0), 1)
  85.     set Status         = STATUS_SUCCESSFUL
  86. finish_ReturnOptions = +
  87.     Return $(Status) $(OptionList) $(OptionTextList)
  88. [InstallOption]
  89.     set Option   = $($1)
  90.     set SrcDir   = $($2)
  91.     set AddCopy  = $($3)
  92.     set DoCopy   = $($4)
  93.     set DoConfig = $($5)
  94.     set LanguageList = ^(LanguagesSupported, 1)
  95.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  96.         Return STATUS_NOLANGUAGE
  97.     endif
  98.     Debug-Output "OEMNADD4.INF: STF_CWDIR is: "$(!STF_CWDIR)
  99.     Debug-Output "OEMNADD4.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  100.     set-subst LF = "\n"
  101.     SetHelpFile "defddi.hlp" 1 600
  102.     read-syms GeneralConstants
  103.     read-syms FileConstants
  104.     Shell $(UtilityInf), GetBindingInfo, "DEC"
  105.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  106.         Debug-Output "ShellCode error: cannot get an error string."
  107.         goto ShellCodeError
  108.     endif
  109.     set NetRuleSoftwareBindable = $($R1)
  110.     read-syms DialogConstants$(!STF_LANGUAGE)
  111.     ifstr(i) $(!NTN_Origination) == "NCPA"
  112.         set Continue = $(OK)
  113.     endif
  114.     read-syms FileConstants$(!STF_LANGUAGE)
  115.     detect date
  116.     set-title  $(FunctionTitle)
  117.     set to   = Begin
  118.     set from = Begin
  119.     set CommonStatus = STATUS_SUCCESSFUL
  120.     EndWait
  121. Begin = +
  122.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  123.         set StartLabel = removeadapter
  124.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  125.         set StartLabel = UpgradeSoftware
  126.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  127.         set StartLabel = bindingadapter
  128.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  129.         set CommonStatus = STATUS_REBOOT
  130.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  131.             Debug-Output "Cannot configure the dec 300 driver software."
  132.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  133.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  134.                 Debug-Output "ShellCode error: cannot get an error string."
  135.                 goto ShellCodeError
  136.             endif
  137.             set Error = $($R0)
  138.             set from = end
  139.             set to = end
  140.             goto nonfatalinfo
  141.         else
  142.             set StartLabel = configureadapter
  143.         endif
  144.     else
  145.         set StartLabel = installadapter
  146.         set OEM_ABANDON_OPTIONS = {}
  147.         set OEM_ABANDON_SOFTWARE = FALSE
  148.         set OEM_ABANDON_ON = TRUE
  149.     endif
  150.     Debug-Output "NTN_Origination"$(!NTN_Origination)
  151.     set from = $(fatal)
  152.     set to = $(fatal)
  153.     goto $(StartLabel)
  154. installadapter = +
  155.     goto nextstep
  156. configureadapter = +
  157.     Ifstr $(KeyProduct) == $(KeyNull)
  158.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  159.         Ifstr $(KeyProduct) == $(KeyNull)
  160.             set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  161.             Debug-Output "Cannot find component product key"
  162.             goto fatalregistry
  163.         Endif
  164.     Endif
  165.     Debug-Output "INF: Shelling to FindService"
  166.     Shell $(UtilityInf) FindService, $(KeyProduct)
  167.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  168.         Debug-Output "INF: FindService shell failure"
  169.         Goto ShellCodeError
  170.     Endif
  171.     Ifstr(i) $($R0) != NO_ERROR
  172.         Debug-Output "INF: FindService Shell error: "$($R0)
  173.         Goto fatalregistry
  174.     endif
  175.     Set KeyParameters = $($R2)
  176.     CloseRegKey $($R1)
  177.     Ifstr $(KeyParameters) == $(KeyNull)
  178.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  179.         Debug-Output "Cannot find component service"
  180.         goto fatalregistry
  181.     endif
  182.     set OldVersionExisted = $(TRUE)
  183.     set ValueName = ""
  184.     set ValueData = ""
  185.     set ValueStr  = ""
  186.     set ValueList = {}
  187.     EnumRegValue $(KeyParameters) ValueList
  188.     ForListDo $(ValueList)
  189.         set ValueItem = $($)
  190.         set ValueName = *($(ValueItem),1)
  191.         set ValueData = *($(ValueItem),4)
  192.         ifstr(i) $(ValueName) == "BurstSize"
  193.             set BurstSizeIndex = $(ValueData)
  194.         else-ifstr(i) $(ValueName) == "FullDuplexEnable"
  195.             set FullDuplexEnableIndex = $(ValueData)
  196.         else-ifstr(i) $(ValueName) == "RcvBuffCnt"
  197.             set RcvBuffCntIndex = $(ValueData)
  198.         else-ifstr(i) $(ValueName) == "XmtBuffCnt"
  199.             set XmtBuffCntIndex = $(ValueData) 
  200.         else-ifstr(i) $(ValueName) == "RequestedTTRT"
  201.             set RequestedTTRTIndex = $(ValueData)
  202.         else-ifstr(i) $(ValueName) == "SlotNumber"
  203.             set SlotNumber = $(ValueData)
  204.         endif
  205.     EndForListDo
  206.     Set Caption = $(FunctionTitle)
  207.     Set Label1  = "Slot #"$(SlotNumber)
  208.     ifstr(i) $(FullDuplexEnableIndex) == 1
  209.         set RadioIn = {1}
  210.     else
  211.         set RadioIn = {2}
  212.     endif
  213.     ifstr(i) $(RequestedTTRTIndex) == ""
  214.         set EditTextIn = {8}
  215.     else
  216.         set EditTextIn = {$(RequestedTTRTIndex)}
  217.     endif
  218.     set BurstSizeValue = *($(BurstSizeList), ~($(BurstSizeValues),$(BurstSizeIndex)))
  219.     ifstr(i) $(BurstSizeValue) == ""
  220.         set BurstSizeValue = 16
  221.     endif
  222.     set ReceiveBuffValue = *($(ReceiveBuffList), ~($(ReceiveBuffValues),$(RcvBuffCntIndex)))
  223.     ifstr(i) $(ReceiveBuffValue) == ""
  224.         set ReceiveBuffValue = 4
  225.     endif
  226.     set TransmitBuffValue = *($(TransmitBuffList), ~($(TransmitBuffValues),$(XmtBuffCntIndex)))
  227.     ifstr(i) $(TransmitBuffValue) == ""
  228.         set TransmitBuffValue = 32
  229.     endif
  230.     set RequestedTTRTValue = RequestedTTRTIndex
  231.     ifstr(i) $(RequestedTTRTValue) == ""
  232.         set RequestedTTRTValue = 8
  233.     endif
  234. displaydialog = +    
  235.     set ExitButton = ""
  236.         LoadLibrary "x" $(!STF_WINDOWSSYSPATH)\$(DialogDllName) hLib
  237.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  238. restart = +    
  239.     set NotifyFields = {YES,NO,NO}
  240.     ui start "InputDlg" $(hLib)
  241.     set ExitButton = $(DLGEVENT)
  242.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  243.         ifint *($(EditTextOut),1) < 4
  244.             shell $(subroutineinf) SetupMessage ENG NONFATAL "Value of Requested TTRT must be between 4 and 165 ms"
  245.             goto restart
  246.         else-ifint *($(EditTextOut),1) > 165
  247.             shell $(subroutineinf) SetupMessage ENG NONFATAL "Value of Requested TTRT must be between 4 and 165 ms"
  248.             goto restart
  249.         endif
  250.         set BurstSizeIndex = *($(BurstSizeValues), ~($(BurstSizeList),$(Combo1Out)))
  251.         set TransmitBuffIndex = *($(TransmitBuffValues), ~($(TransmitBuffList),$(Combo3Out)))
  252.         set ReceiveBuffIndex = *($(ReceiveBuffValues), ~($(ReceiveBuffList),$(Combo2Out)))
  253.         ifstr(i) *($(RadioOut),1) == 1
  254.             Set FullDuplexEnableIndex = 1
  255.         else
  256.             Set FullDuplexEnableIndex = 2
  257.         endif
  258.         set RequestedTTRTIndex = *($(EditTextOut),1)
  259.         FreeLibrary $(hLib)
  260.         ui pop 1
  261.         ifstr(i) $(StartLabel) == installadapter
  262.             Set Successful_Install = 1
  263.             goto returnpoint
  264.         endif
  265.     else-ifstr(i) $(DLGEVENT) == "NOTIFY"
  266.         goto restart
  267.     else-ifstr(i) $(DLGEVENT) == "BACK"
  268.         FreeLibrary $(hLib)
  269.         ui pop 1
  270.         ifstr(i) $(StartLabel) == installadapter
  271.             goto returnpoint
  272.         else
  273.             CloseRegKey $(KeyParameters)
  274.             set CommonStatus = STATUS_USERCANCEL
  275.             goto end
  276.         endif
  277.     else
  278.         FreeLibrary $(hLib)
  279.         ui pop 1
  280.         goto end
  281.     endif
  282.     set NewValueList = {{RcvBuffCnt,$(NoTitle),$(!REG_VT_DWORD),$(ReceiveBuffIndex)},+
  283.                         {BurstSize,$(NoTitle),$(!REG_VT_DWORD),$(BurstSizeIndex)},+
  284.                         {XmtBuffCnt,$(NoTitle),$(!REG_VT_DWORD),$(TransmitBuffIndex)},+
  285.                         {FullDuplexEnable,$(NoTitle),$(!REG_VT_DWORD),$(FullDuplexEnableIndex)},+
  286.                         {RequestedTTRT,$(NoTitle),$(!REG_VT_DWORD),$(RequestedTTRTIndex)}}
  287.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  288.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  289.         goto ShellCodeError
  290.     endif
  291.     CloseRegKey $(KeyParameters)
  292.     goto successful
  293. nextstep = +
  294.     StartWait
  295. installproduct = +
  296.     Shell $(UtilityInf), EISAFindBus, $(DEC300_1BYTE)
  297.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  298.         goto ShellCodeError
  299.     endif
  300.     ifstr $($R0) != "NO_ERROR"
  301.         set Error = $($R0)
  302.         goto fatal
  303.     endif
  304.     ifstr(i) $($R1) == {}
  305.         set Error = $(CANNOT_FIND_ANY_CARD)
  306.         set CommonStatus = STATUS_USERCANCEL
  307.         set from = end
  308.         goto nonfatal
  309.     endif
  310.     set AdapterList = $($R1)
  311.     Set AllAdaptersInstalled = $(TRUE)
  312.     ForListDo $(AdapterList)
  313.         set BusNum = *($($),1)
  314.         set SlotNum = *($($),2)
  315.         Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(BusNum), +
  316.             $(SlotNum), $(ProductHardwareDescription), $(ProductHardwareName)
  317.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  318.             goto ShellCodeError
  319.         endif
  320.         ifstr $($R0) != "NO_ERROR"
  321.             set Error = $($R0)
  322.             goto fatal
  323.         endif
  324.         ifstr(i) $($R1) != "YES"
  325.                 Set AllAdaptersInstalled = $(FALSE)
  326.                 Set ReceiveBuffValue = 4
  327.                 Set TransmitBuffValue = 32
  328.                 Set BurstSizeValue = 16
  329.                 Set EditTextIn = {"8"}
  330.                 Set RadioIn = {2}
  331.                 Set Caption = $(FunctionTitle)
  332.                 Set Label1  = "Slot #"$(SlotNum)
  333.                 Set ExitButton = ""
  334.                 goto displaydialog
  335.         else
  336.                 Set ExitButton = ""
  337.                 Set OldVersionExisted = $(TRUE)
  338.         endif
  339. returnpoint = +
  340.         ifstr(i) $(ExitButton) == "CONTINUE"
  341.             Set List1 = >($(List1),$(BusNum))
  342.             Set List2 = >($(List2),$(SlotNum))
  343.             Set List3 = >($(List3),$(ReceiveBuffIndex))
  344.             Set List4 = >($(List4),$(BurstSizeIndex))
  345.             Set List5 = >($(List5),$(TransmitBuffIndex))
  346.             Set List6 = >($(List6),$(FullDuplexEnableIndex))
  347.             Set List7 = >($(List7),$(RequestedTTRTIndex))
  348.         endif
  349.     EndForListDo
  350.     ifstr(i) $(AllAdaptersInstalled) == $(TRUE)
  351.         shell $(subroutineinf) SetupMessage ENG NONFATAL "All DEC FDDIcontroller/EISA adapters already installed"
  352.     endif
  353.     ifstr(i) $(Successful_Install) == 1
  354.         Debug-Output "Successful Install"
  355.     ifint $(OldVersionExisted) == $(FALSE)
  356.         Ifstr(i) $(DoCopy) == "YES"
  357.            Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  358.            Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  359.                Goto ShellCodeError
  360.            Else-Ifstr(i) $($R0) == STATUS_FAILED
  361.                Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  362.                ifint $($ShellCode) != $(!SHELL_CODE_OK)
  363.                   goto ShellCodeError
  364.                endif
  365.                set Error = $($R0)
  366.                Goto fatal
  367.            Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  368.                Goto successful
  369.            Endif
  370.            Set SrcDir = $($R1)
  371.         Endif
  372.         install "Install-Option"
  373.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  374.            Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  375.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  376.                goto ShellCodeError
  377.            endif
  378.            set Error = $($R0)
  379.            goto fatal
  380.         endif
  381.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  382.             $(ProductSoftwareName), +
  383.             $(ProductSoftwareName), +
  384.             $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  385.             $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  386.             $(NetEventDLL)
  387.         Set OEM_ABANDON_SOFTWARE = TRUE
  388.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  389.             goto ShellCodeError
  390.         endif
  391.         set RegistryErrorIndex = $($R0)
  392.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  393.             EndWait
  394.             CloseRegKey $($R1)
  395.             CloseRegKey $($R2)
  396.             CloseRegKey $($R3)
  397.             CloseRegKey $($R4)
  398.             CloseRegKey $($R5)
  399.             goto fatalregistry
  400.         endif
  401.         Set SoftProductKey      = $($R1)
  402.         Set SoftNetRuleKey      = $($R2)
  403.         Set SoftServiceKey      = $($R3)
  404.         Set SoftParameterKey    = $($R4)
  405.         Set SoftLinkageKey      = $($R5)
  406.         set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  407.                            {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  408.                            {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  409.                            {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  410.                            {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  411.                            {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  412.                            {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  413.         Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  414.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  415.             goto ShellCodeError
  416.         endif
  417.         set RegistryErrorIndex = $($R0)
  418.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  419.             EndWait
  420.             CloseRegKey $(SoftProductKey)
  421.             CloseRegKey $(SoftNetRuleKey)
  422.             CloseRegKey $(SoftServiceKey)
  423.             CloseRegKey $(SoftParameterKey)
  424.             CloseRegKey $(SoftLinkageKey)
  425.             goto fatalregistry
  426.         endif
  427.         set BindableTxt  = {"defeaDriver dec300Adapter non exclusive 100"}
  428.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  429.                             {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  430.                             {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  431.                             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  432.                             {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(BindableTxt)}, +
  433.                             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  434.         Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  435.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  436.             goto ShellCodeError
  437.         endif
  438.         set RegistryErrorIndex = $($R0)
  439.         CloseRegKey $(SoftProductKey)
  440.         CloseRegKey $(SoftNetRuleKey)
  441.         CloseRegKey $(SoftServiceKey)
  442.         CloseRegKey $(SoftParameterKey)
  443.         CloseRegKey $(SoftLinkageKey)
  444.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  445.             EndWait
  446.             goto fatalregistry
  447.         endif
  448.     endif
  449.     else
  450.         set CommonStatus = STATUS_USERCANCEL
  451.         goto successful
  452.     endif
  453.     ForListDo $(List1)
  454.         ifstr(i) $($) != ""
  455.                 Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  456.                 ifint $($R4) != -1
  457.                     Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  458.                 endif
  459.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  460.                     goto ShellCodeError
  461.                 endif
  462.                 set RegistryErrorIndex = $($R0)
  463.                 Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  464.                     EndWait
  465.                     CloseRegKey $($R1)
  466.                     CloseRegKey $($R2)
  467.                     CloseRegKey $($R3)
  468.                     goto fatalregistry
  469.                 endif
  470.                 Set HardNetCardKey      = $($R1)
  471.                 Set HardNetRuleKey      = $($R2)
  472.                 Set HardParameterKey    = $($R3)
  473.                 set AdapterNumber = $($R4)
  474.                 set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  475.                                    {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardwareTitle)},+
  476.                                    {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareDescription)},+
  477.                                    {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  478.                                    {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  479.                                    {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)},+
  480.                                    {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  481.                 Shell  $(UtilityInf), AddValueList, $(HardNetCardKey), $(NewValueList)
  482.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  483.                     goto ShellCodeError
  484.                 endif
  485.                 set NewValueList = {{CardType,$(NoTitle),$(!REG_VT_DWORD),5},+
  486.                                    {BusType,$(NoTitle),$(!REG_VT_DWORD),2},+
  487.                                    {MediaType,$(NoTitle),$(!REG_VT_DWORD),3},+
  488.                                    {EisaCompressedId,$(NoTitle),$(!REG_VT_DWORD),$(DEC300_1BYTE)},+
  489.                                    {BusNumber,$(NoTitle),$(!REG_VT_DWORD),*($(List1),$(#))},+
  490.                                    {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),*($(List2),$(#))},+
  491.                                    {RcvBuffCnt,$(NoTitle),$(!REG_VT_DWORD),*($(List3),$(#))},+
  492.                                    {BurstSize,$(NoTitle),$(!REG_VT_DWORD),*($(List4),$(#))},+
  493.                                    {XmtBuffCnt,$(NoTitle),$(!REG_VT_DWORD),*($(List5),$(#))},+
  494.                                    {FullDuplexEnable,$(NoTitle),$(!REG_VT_DWORD),*($(List6),$(#))},+
  495.                                    {RequestedTTRT,$(NoTitle),$(!REG_VT_DWORD),*($(List7),$(#))}}
  496.           Shell  $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  497.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  498.                     goto ShellCodeError
  499.                 endif
  500.                 set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  501.                 set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  502.                 set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  503.                                     {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  504.                                     {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  505.                                     {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  506.                 Shell  $(UtilityInf), AddValueList, $(HardNetRuleKey), $(NewValueList)
  507.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  508.                     goto ShellCodeError
  509.                 endif
  510.                 CloseRegKey $(HardNetCardKey)
  511.                 CloseRegKey $(HardNetRuleKey)
  512.                 CloseRegKey $(HardParameterKey)
  513.             endif
  514.         EndForListDo
  515.     goto writeparameters
  516. writeparameters = +
  517.     EndWait
  518.     goto successful
  519. bindingadapter =+
  520.     set Error = "Binding: Sorry, not yet implemented."
  521.     goto fatal
  522. removeadapter = +
  523.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  524.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  525.             $(ProductSoftwareName)
  526.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  527.             Debug-Output "ShellCode error"
  528.             goto ShellCodeError
  529.         endif
  530.         set RegistryErrorIndex = $($R0)
  531.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  532.             goto fatalregistry
  533.         endif
  534.     else
  535.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  536.             $(ProductSoftwareName), $(!NTN_RegBase)
  537.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  538.             Debug-Output "ShellCode error"
  539.             goto ShellCodeError
  540.         endif
  541.         set RegistryErrorIndex = $($R0)
  542.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  543.             goto fatalregistry
  544.         endif
  545.     endif
  546.     goto end
  547. UpgradeSoftware = +
  548.     ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  549.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  550.         Ifstr $(KeyProduct) != $(KeyNull)
  551.             GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  552.             set Version = *($(VersionInfo), 4)
  553.             Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  554.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  555.                 Debug-Output "ShellCode error"
  556.                 goto ShellCodeError
  557.             endif
  558.             set !UG_Filename = $($R0)
  559.             ifstr(i) $(!UG_Filename) != ""
  560.                 install "Install-Update"
  561.                 ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  562.                     goto fatal
  563.                 endif
  564.             endif
  565.             SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  566.             SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  567.             ifint $(Version) != $(ProductVersion)
  568.             endif
  569.             CloseRegKey $(KeyProduct)
  570.             OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Linkage" $(MAXIMUM_ALLOWED) LinkageKey
  571.             ifstr(i) $(LinkageKey) != ""
  572.                 GetRegValue $(LinkageKey) Bind BindInfo
  573.                 ForListDo *($(BindInfo),4)
  574.                     Split-String $($) "\" CardInfo
  575.                     QueryListSize CardPos $(CardInfo)
  576.                     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"*($(CardInfo),$(CardPos))"\Parameters" $(MAXIMUM_ALLOWED) ParamKey
  577.                     ifstr $(ParamKey) != ""
  578.                         SetRegValue $(ParamKey) {MediaType,$(NoTitle),$(!REG_VT_DWORD),3}
  579.                         CloseRegKey $(ParamKey)
  580.                     endif
  581.                 EndForListDo
  582.                 CloseRegKey $(LinkageKey)
  583.             endif
  584.         else
  585.             goto fatalregistry
  586.         endif
  587.     else
  588.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) +
  589.               $(MAXIMUM_ALLOWED) NetworkCardKey
  590.         Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  591.             GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  592.             set ServiceName = *($(ServiceNameInfo), 4)
  593.             OpenRegKey $(NetworkCardKey) "" "NetRules" +
  594.                 $(MAXIMUM_ALLOWED) NetRuleKey
  595.             Ifstr(i) $(NetRuleKey) != $(KeyNull)
  596.             else
  597.                 goto fatalregistry
  598.             endif
  599.             CloseRegKey $(NetRules)
  600.             CloseRegKey $(NetworkCardKey)
  601.         else
  602.             goto fatalregistry
  603.         endif
  604.         OpenRegKey $(!REG_H_LOCAL) "" +
  605.               $(!NTN_ServiceBase)"\"$(ServiceName) +
  606.               $(MAXIMUM_ALLOWED) ServiceKey
  607.         Ifstr(i) $(ServiceKey) != $(KeyNull)
  608.             CloseRegKey $(ServiceKey)
  609.         else
  610.             goto fatalregistry
  611.         endif
  612.     endif
  613.     set iSearch = 1
  614. nextnetcard = +
  615.     Shell $(UtilityInf), FindNextNetworkCard, $(ProductHardwareName), $(iSearch)
  616.     set KeyNetcard = $($R0)
  617.     set iSearch = $($R1)
  618.     Debug-Output "OemNadEp.Inf: FindNextNetworkCard "$(KeyNetcard)","$(iSearch)
  619.     Ifstr $(KeyNetcard) != $(KeyNull)
  620.         Debug-Output "OemNadEp.Inf: Setting OperationsSupport value"
  621.         SetRegValue $(KeyNetcard) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  622.         CloseRegKey $(KeyNetcard)
  623.         goto nextnetcard
  624.     Endif
  625.     goto end
  626. successful = +
  627.     goto end
  628. abandon = +
  629.     ForListDo $(OEM_ABANDON_OPTIONS)
  630.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  631.             $(ProductSoftwareName), $($)
  632.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  633.             Debug-Output "ShellCode error"
  634.             goto ShellCodeError
  635.         endif
  636.         set RegistryErrorIndex = $($R0)
  637.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  638.             goto fatalregistry
  639.         endif
  640.     EndForListDo
  641.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  642.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  643.             $(ProductSoftwareName), FALSE
  644.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  645.             Debug-Output "ShellCode error"
  646.             goto ShellCodeError
  647.         endif
  648.         set RegistryErrorIndex = $($R0)
  649.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  650.             goto fatalregistry
  651.         endif
  652.     endif
  653.     goto end
  654. warning = +
  655.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  656.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  657.         goto ShellCodeError
  658.     endif
  659.     ifstr(i) $($R1) == "OK"
  660.         goto $(to)
  661.     else-ifstr(i) $($R1) == "CANCEL"
  662.         goto $(from)
  663.     else
  664.         goto "end"
  665.     endif
  666. nonfatalinfo = +
  667.     Set CommonStatus = STATUS_USERCANCEL
  668.     Set Severity = STATUS
  669.     goto nonfatalmsg
  670. nonfatal = +
  671.     Set Severity = NONFATAL
  672.     goto nonfatalmsg
  673. nonfatalmsg = +
  674.     ifstr(i) $(Error) == ""
  675.         Set Severity = NONFATAL
  676.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  677.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  678.             goto ShellCodeError
  679.         endif
  680.         set Error = $($R0)
  681.     endif
  682.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  683.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  684.         goto ShellCodeError
  685.     endif
  686.     ifstr(i) $($R1) == "OK"
  687.         goto $(from)
  688.     else
  689.         goto "end"
  690.     endif
  691. fatalregistry = +
  692.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  693.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  694.         goto ShellCodeError
  695.     endif
  696.     set Error = $($R0)
  697.     goto fatal
  698. fatal = +
  699.     ifstr(i) $(Error) == ""
  700.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  701.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  702.             goto ShellCodeError
  703.         endif
  704.         set Error = $($R0)
  705.     endif
  706.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  707.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  708.         goto ShellCodeError
  709.     endif
  710.     goto setfailed
  711. ShellCodeError = +
  712.     set DlgType      = "MessageBox"
  713.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  714.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  715.     set STF_MB_TYPE  = 1
  716.     set STF_MB_ICON  = 3
  717.     set STF_MB_DEF   = 1
  718.     ui start "Error Message"
  719.     goto setfailed
  720. setfailed = +
  721.     set CommonStatus = STATUS_FAILED
  722.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  723.         set OEM_ABANDON_ON = FALSE
  724.         goto abandon
  725.     endif
  726.     goto end
  727. end = +
  728.     goto term
  729. term = +
  730.     Return $(CommonStatus)
  731. [Install-Option]
  732.     set STF_VITAL = ""
  733.     ifstr(i) $(AddCopy) == "YES"
  734.         AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  735.     endif
  736.     ifstr(i) $(DoCopy) == "YES"
  737.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  738.        CopyFilesInCopyList
  739.     endif
  740.     ifstr(i) $(DoConfig) == "YES"
  741.     endif
  742.     Exit
  743. [Install-Update]
  744.    set STF_VITAL        = ""
  745.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  746.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  747.    AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  748.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  749.    CopyFilesInCopyList
  750.    exit
  751. [Source Media Descriptions]
  752.     1 = "Windows NT Server CD-ROM", TAGFILE = cdrom_s.40
  753. [Signature]
  754.     FileType = MICROSOFT_FILE
  755. [GetSignature]
  756.     read-syms Signature
  757.     return $(FileType)
  758. [ProductType]
  759. STF_PRODUCT  = LanmanNT
  760. STF_PLATFORM = I386
  761. [Files-Inf]
  762. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  763. [Files-DEC300]
  764. 1,DEFEA.SYS , SIZE=999
  765. [LanguagesSupported]
  766.         ENG
  767. [OptionsTextENG]
  768.         DEC300     = "DEC FDDIcontroller/EISA"
  769. [FileConstantsENG]
  770. ProCaption   = "Windows NT Setup"
  771. ProCancel    = "Cancel"
  772. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  773.                            "Are you sure you want to cancel copying files?"
  774. ProCancelCap = "Network Setup Message"
  775. ProText1     = "Copying:"
  776. ProText2     = "To:"
  777. FunctionTitle   = "DEC FDDIcontroller/EISA Card Setup"
  778. ProductSoftwareDescription      = "DEC FDDIcontroller/EISA Driver"
  779. ProductHardwareDescription      = "DEC FDDIcontroller/EISA"
  780. CANNOT_FIND_ANY_CARD            = "Network card is not present in the system"
  781. ProductSoftwareTitle    = "DEC FDDIcontroller/EISA Driver"
  782. ProductHardwareTitle    = "DEC FDDIcontroller/EISA Adapter"
  783. ShellCodeErrorTitle     = "Error: "$(FunctionTitle)
  784. ShellCodeErrorText      = "Shell Code Error."
  785. BurstSizeList = ^(BurstSizeChoices,1)
  786. BurstSizeValues = ^(BurstSizeChoices,2)
  787. ReceiveBuffList = ^(ReceiveBuffChoices,1)
  788. ReceiveBuffValues = ^(ReceiveBuffChoices,2)
  789. TransmitBuffList = ^(TransmitBuffChoices,1)
  790. TransmitBuffValues = ^(TransmitBuffChoices,2)
  791. DialogDllName = "defea.dll"
  792. [DialogConstantsENG]
  793. Help        = "&Help"
  794. Exit        = "Cancel"
  795. OK          = "OK"
  796. HelpContext = 1
  797. Continue    = "Continue"
  798. Cancel      = "Cancel"
  799. [FileDependentDlgENG]
  800. DlgType = "RadioCombination"
  801. DlgTemplate = "DEFEA"
  802. Combo1 = "Burst Size:"
  803. Combo2 = "Receive Buffers:"
  804. Combo3 = "Transmit Buffers:"
  805. Group = "Full Duplex Enable"
  806. Edit1 = "Requested TTRT(ms):"
  807. Combo1List = $(BurstSizeList)
  808. Combo1Out = $(BurstSizeValue)
  809. Combo2List = $(ReceiveBuffList)
  810. Combo2Out = $(ReceiveBuffValue)
  811. Combo3List = $(TransmitBuffList)
  812. Combo3Out = $(TransmitBuffValue)
  813. ComboListItemsIn = {Combo2List,Combo3List}
  814. ComboListItemsOut = {Combo2Out,Combo3Out}
  815. EditTextLim = {3}
  816. [BurstSizeChoices]
  817. Burst_1 = "4",0
  818. Burst_2 = "8",1
  819. Burst_3 = "16",2
  820. [ReceiveBuffChoices]
  821. Receive_1 = "2",2
  822. Receive_2 = "4",4
  823. Receive_3 = "8",8
  824. [TransmitBuffChoices]
  825. Transmit_1 = "8",8
  826. Transmit_2 = "16",16
  827. Transmit_3 = "32",32
  828. Transmit_4 = "64",64
  829. Transmit_5 = "128",128
  830.